package com.lksoft.bz.action;

import java.awt.event.ActionEvent;
import java.util.Locale;

import javax.swing.AbstractAction;

import com.lksoft.bz.Bz;

public class ChangeLanguageAction extends AbstractAction {
	private static final long serialVersionUID = -2852313660515884289L;
	
	private Bz bz;
	private Locale language;
	
	/**
	 * @param bz The program
	 */
	public ChangeLanguageAction(Bz bz, Locale language){
		super(language.getDisplayLanguage(language), null);
		this.bz = bz;
		this.language = language;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		bz.setLanguage(language);
	}

}
